package virtorina.client.room.rpc;

import java.util.ArrayList;
import java.util.LinkedList;

import virtorina.client.room.dto.ChatMsgDTO;
import virtorina.client.room.dto.InfoDTO;
import virtorina.client.room.dto.QuestionDTO;
import virtorina.client.room.dto.UserDTO;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

// This is the servlet mapping in web.xml file
@RemoteServiceRelativePath("gwtservice")
public interface GWTService4Room extends RemoteService {
	boolean add(Long RoomID, String msg);
	public ArrayList<ChatMsgDTO> getNewMessage(int RoomID);
	public LinkedList<UserDTO> getNewUsers(int RoomID);
	public LinkedList<Long> getLeaveUsers(int RoomID);
	int getUpdates(int RoomID);
	UserDTO getUser(int RoomID);
	boolean validate(String nick);
	String updateName(String text, int RoomID);
	void leave(int RoomID);
	QuestionDTO getQuestion(int RoomID);
	InfoDTO getInfo(int RoomID);
	int Chkansw(int RoomID, String answer);
	int setComplaint(int RoomID, int type);
	String getName(Integer RoomID);
}
